package com.qfedu.sca.controller;

import com.qfedu.sca.common.vo.R;
import com.qfedu.sca.feign.HelloService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * 千锋Java,为你而生！
 *
 * @Author: Feri
 * @Date:2024/11/7 15:00
 * @Modified:
 */
@RestController
@RequestMapping("api/hello")
public class HelloController {
    @Resource
    private HelloService service;

    @GetMapping("random")
    public String luckNum(){
        return service.hi();
    }

    @PostMapping("upload")
    public R upload(@RequestPart MultipartFile file){
        return service.upload(file);
    }
}